import request from '@/config/axios'

/** 部门协同-任务日志信息 */
export interface ProjectTaskLog {
    id: number; // ID
    taskId?: number; // 任务id
    type?: string; // 任务类型  1.操作 2.评论
    content?: string; // 内容
    remark: string; // 备注
}

// 部门协同-任务日志 API
export const ProjectTaskLogApi = {
    // 查询部门协同-任务日志分页
    getProjectTaskLogPage: async (params: any) => {
        return await request.get({url: `/synergy/project-task-log/page`, params})
    },

    // 查询部门协同-任务日志详情
    getProjectTaskLog: async (id: number) => {
        return await request.get({url: `/synergy/project-task-log/get?id=` + id})
    },

    // 新增部门协同-任务日志
    createProjectTaskLog: async (data: ProjectTaskLog) => {
        return await request.post({url: `/synergy/project-task-log/create`, data})
    },

    // 修改部门协同-任务日志
    updateProjectTaskLog: async (data: ProjectTaskLog) => {
        return await request.put({url: `/synergy/project-task-log/update`, data})
    },

    // 删除部门协同-任务日志
    deleteProjectTaskLog: async (id: number) => {
        return await request.delete({url: `/synergy/project-task-log/delete?id=` + id})
    },

    /** 批量删除部门协同-任务日志 */
    deleteProjectTaskLogList: async (ids: number[]) => {
        return await request.delete({url: `/synergy/project-task-log/delete-list?ids=${ids.join(',')}`})
    },

    // 导出部门协同-任务日志 Excel
    exportProjectTaskLog: async (params) => {
        return await request.download({url: `/synergy/project-task-log/export-excel`, params})
    }
}
